<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="pt" xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:sec="http://www.springframework.org/security/facelets/tags"
	xmlns:p="http://primefaces.org/ui">
<ui:composition template="/templates/admin/home-admin.xhtml">
	<ui:define name="corpo">
		<h:form>
		<div align="center">
		<h:panelGrid columns="1" >
			<h2>Pendetes de Aprovação</h2>
			<p:dataTable  id="listPanel"
				value="#{aprovacaoMB.listEntity}" var="ap" rows="5"
				emptyMessage="Não existem cadastros pendentes de aprovação." paginator="true" style="width: 1026px;">
				
				<p:column headerText="NOME">
					<h:outputText value="#{ap.nome}" />
				</p:column>
				
				<p:column headerText="CNPJ">
					<h:outputText value="#{ap.cnpj}" />
				</p:column>
				
				<p:column headerText="STATUS">
					<h:outputText value="#{ap.ativo}" />
				</p:column>
				
				<p:column headerText="Aprovar">
					<p:selectBooleanCheckbox value="#{ap.aprovado}" />
				</p:column>
			</p:dataTable>
			<p:commandButton value="Confirmar" rendered="#{not empty aprovacaoMB.listEntity}" action="#{aprovacaoMB.aprovar}" ajax="false" />
			</h:panelGrid>
			</div>
		</h:form>
		<h:form>
		 	<p:commandButton value="Voltar" action="home-admin.jsf" ajax="false" title="Voltar para  a tela inicial do sistema"/>
		</h:form>
	</ui:define>
</ui:composition>
</html>